﻿/*
 * Created by SharpDevelop.
 * User: Administrator
 * Date: 2016/5/4
 * Time: 14:57
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Collections.Generic;
using SharpErp.Data.Common.Entity;
using SharpErp.Data.Common.View;

namespace SharpErp.Data.Service
{
	/// <summary>
	/// Description of ISharpErpService.
	/// </summary>
	public interface ISharpErpService
	{
		List<T> GetAllKvItemClass<T>(string key);

		void SetAllKvItemClass<T>(List<T> list, string key);

        string ping();

		#region ItemClass
		List<ItemClass> GetAllItemClass();
		
		void AddItemClass(ItemClass item);
		
		void UpdateItemClass(ItemClass item);
		
		void DeleteItemClass(int id);
		#endregion

		#region Item

		List<ItemFirstClass> GetSysItemFirstClass();
		
		void AddItemFirstClass(ItemFirstClass item);
		
		void UpdateItemFirstClass(ItemFirstClass item);
		
		void DeleteItemFirstClass(int id);

        string GetItemFirstClassCode(int id);

		List<ItemSecondClass> GetSysItemSecondClass();

		List<ItemSecondClass> GetSysItemSecondClassByParentId(int parentId);

        List<ItemSecondClass> GetSysItemSecondClassByParentIds(HashSet<int> parentId);
		
		void AddItemSecondClass(ItemSecondClass item);
		
		void UpdateItemSecondClass(ItemSecondClass item);
		
		void DeleteItemSecondClass(int id);

        List<ItemThirdClass> GetSysItemThirdClassByParentId(int parentId);

        List<ItemThirdClass> GetSysItemThirdClassByParentIds(HashSet<int> parentId);

        void AddItemThirdClass(ItemThirdClass item);

        void UpdateItemThirdClass(ItemThirdClass item);

        void DeleteItemThirdClass(int id);

        List<ItemForthClass> GetSysItemFourClassByParentId(int parentId);

        List<ItemForthClass> GetSysItemFourClassByParentIds(HashSet<int> parentId);

        void AddItemFourClass(ItemForthClass item);

        void UpdateItemFourClass(ItemForthClass item);

        void DeleteItemFurClass(int id);

        List<ItemFifthClass> GetSysItemFiveClassByParentId(int parentId);

        List<ItemFifthClass> GetSysItemFiveClassByParentIds(HashSet<int> parentId);

        void AddItemFiveClass(ItemFifthClass item);

        void UpdateItemFiveClass(ItemFifthClass item);

        void DeleteItemFiveClass(int id);

        List<ItemSixClass> GetSysItemSixClassByParentId(int parentId);

        List<ItemSixClass> GetSysItemSixClassByParentIds(HashSet<int> parentId);

        void AddItemSixClass(ItemSixClass item);

        void UpdateItemSixClass(ItemSixClass item);

        void DeleteItemSixClass(int id);

        List<ItemSevenClass> GetSysItemSevenClassByParentId(int parentId);

        List<ItemSevenClass> GetSysItemSevenClassByParentIds(HashSet<int> parentId);

        void AddItemSevenClass(ItemSevenClass item);

        void UpdateItemSevenClass(ItemSevenClass item);

        void DeleteItemSevenClass(int id);

        List<ItemEightClass> GetSysItemEightClassByParentId(int parentId);

        List<ItemEightClass> GetSysItemEightClassByParentIds(HashSet<int> parentId);

        String GetItemEightClassCode(int id);

        void AddItemEightClass(ItemEightClass item);

        void UpdateItemEightClass(ItemEightClass item);

        void DeleteItemEightClass(int id);

        List<ItemNineClass> GetSysItemNineClassByParentId(int parentId);

        List<ItemNineClass> GetSysItemNineClassByParentIds(HashSet<int> parentId);

        void AddItemNineClass(ItemNineClass item);

        void UpdateItemNineClass(ItemNineClass item);

        void DeleteItemNineClass(int id);

        #endregion

        #region Production

        List<ProductionFirstClass> GetSysProductionFirstClass();

        void AddProductionFirstClass(ProductionFirstClass item);

        void UpdateProductionFirstClass(ProductionFirstClass item);

        void DeleteProductionFirstClass(int id);

        string GetProductionFirstClassCode(int id);

        List<ProductionSecondClass> GetSysProductionSecondClass();

        List<ProductionSecondClass> GetSysProductionSecondClassByParentId(int parentId);

        List<ProductionSecondClass> GetSysProductionSecondClassByParentIds(HashSet<int> parentId);

        void AddProductionSecondClass(ProductionSecondClass item);

        void UpdateProductionSecondClass(ProductionSecondClass item);

        void DeleteProductionSecondClass(int id);

        List<ProductionThirdClass> GetSysProductionThirdClassByParentId(int parentId);

        List<ProductionThirdClass> GetSysProductionThirdClassByParentIds(HashSet<int> parentId);

        void AddProductionThirdClass(ProductionThirdClass item);

        void UpdateProductionThirdClass(ProductionThirdClass item);

        void DeleteProductionThirdClass(int id);

        List<ProductionForthClass> GetSysProductionFourClassByParentId(int parentId);

        List<ProductionForthClass> GetSysProductionFourClassByParentIds(HashSet<int> parentId);

        void AddProductionFourClass(ProductionForthClass item);

        void UpdateProductionFourClass(ProductionForthClass item);

        void DeleteProductionFurClass(int id);

        List<ProductionFifthClass> GetSysProductionFiveClassByParentId(int parentId);

        List<ProductionFifthClass> GetSysProductionFiveClassByParentIds(HashSet<int> parentId);

        void AddProductionFiveClass(ProductionFifthClass item);

        void UpdateProductionFiveClass(ProductionFifthClass item);

        void DeleteProductionFiveClass(int id);

        List<ProductionSixClass> GetSysProductionSixClassByParentId(int parentId);

        List<ProductionSixClass> GetSysProductionSixClassByParentIds(HashSet<int> parentId);

        void AddProductionSixClass(ProductionSixClass item);

        void UpdateProductionSixClass(ProductionSixClass item);

        void DeleteProductionSixClass(int id);

        List<ProductionSevenClass> GetSysProductionSevenClassByParentId(int parentId);

        List<ProductionSevenClass> GetSysProductionSevenClassByParentIds(HashSet<int> parentId);

        void AddProductionSevenClass(ProductionSevenClass item);

        void UpdateProductionSevenClass(ProductionSevenClass item);

        void DeleteProductionSevenClass(int id);

        List<ProductionEightClass> GetSysProductionEightClassByParentId(int parentId);

        List<ProductionEightClass> GetSysProductionEightClassByParentIds(HashSet<int> parentId);

        String GetProductionEightClassCode(int id);

        void AddProductionEightClass(ProductionEightClass item);

        void UpdateProductionEightClass(ProductionEightClass item);

        void DeleteProductionEightClass(int id);

        List<ProductionNineClass> GetSysProductionNineClassByParentId(int parentId);

        List<ProductionNineClass> GetSysProductionNineClassByParentIds(HashSet<int> parentId);

        int AddProductionNineClass(ProductionNineClass item);

        int AddProductionNineClassWithBindGoods(ProductionNineClass item, List<CustomerGoodsClass> goodsList);

        void UpdateProductionNineClass(ProductionNineClass item);

        void UpdateProductionNineClassWithBindGoods(ProductionNineClass item, List<CustomerGoodsClass> goodsList);

        void DeleteProductionNineClass(int id);

        List<ProductionTenClass> GetSysProductionTenClassByParentId(int parentId);

        List<ProductionTenClass> GetSysProductionTenClassByParentIds(HashSet<int> parentId);

        void AddProductionTenClass(ProductionTenClass item);

        void UpdateProductionTenClass(ProductionTenClass item);

        void DeleteProductionTenClass(int id);

        #endregion

        #region CustomerFirstClass

        List<CustomerFirstClass> GetSysCustomerFirstClass();

	    void AddCustomerFirstClass(CustomerFirstClass item);

	    void UpdateCustomerFirstClass(CustomerFirstClass item);

	    void DeleteCustomerFirstClass(int id);

	    #endregion
	    
	    #region CustomerSecondClass
	    
	    List<CustomerSecondClass> GetSysCustomerSecondClass();

	    List<CustomerSecondClass> GetCustomerSecondClassByParentId(int parentId);

        List<CustomerSecondClass> GetCustomerSecondClassByParentIds(List<int> ids);
	    
	    int AddCustomerSecondClass(CustomerSecondClass item);
	    
	    void UpdateCustomerSecondClass(CustomerSecondClass item);
	    
	    void DeleteCustomerSecondClass(int id);

	    string GetCustomerSecondClassNextCode();

	    #endregion
	    
	    #region CustomerThirdClass
	    
	    List<CustomerThirdClass> GetSysCustomerThirdClass();
	    
	    List<CustomerThirdClass> GetCustomerThirdClassByParentId(int parentId);
	    
	    List<CustomerThirdClass> GetCustomerThirdClassByParentIds(HashSet<int> ids);
	    
	    void AddCustomerThirdClass(CustomerThirdClass item);
	    
	    void UpdateCustomerThirdClass(CustomerThirdClass item);
	    
	    void DeleteCustomerThirdClass(int id);

        #endregion

        #region CustomerGoods

        void AddCustomerGoodsClass(CustomerGoodsClass item);

        void DeleteCustomerGoodsClass(int id);

        void DeleteCustomerGoodsClassByCustomerAndItem(int customerSecondId, int itemNineClassId);

        List<CustomerGoodsClass> GetCustomerGoods(int customerFirstId, int customerSecondId);

        List<QueryGoodsInfoView> GetCustomerGoodsView(int customerFirstId, int customerSecondId);

        #endregion

        #region GeneralInfoItem

        List<GeneralInfoItem> GetSysGeneralInfoItem(string key);
	    
	    void AddGeneralInfoItem(string key, GeneralInfoItem item);
	    
	    void UpdateGeneralInfoItem(string key, GeneralInfoItem item);
	    
	    void DeleteGeneralInfoItem(string key , int id);

        #endregion

        #region formulation

	    List<FormulationItem> GetSysFormulationItem(string key);
	    
	    void AddFormulationItem(string key, FormulationItem item);
	    
	    void UpdateFormulationItem(string key, FormulationItem item);
	    
	    void DeleteFormulationItem(string key , int id);

        #endregion

        #region report

        List<Common.View.GoodsBarcodeView> GetGoodsBarcodeViews(List<int> ids);

        List<Common.View.GoodsBarcodeView> GetMaterialBarcodeViews(List<int> ids);

        List<Common.View.GoodsBarcodeView> GetProductionBarcodeViews(List<int> ids);

        List<Common.View.OtherBasicDataView> GetOtherBasicDataView(string kvKey, List<int> ids);

        List<Common.View.CompanyStaffView> GetCompanyStaffView(List<int> ids);

        #endregion

        #region function

        void CloneItemSevenClass(HashSet<int> ids, bool includeChildren);

        void CloneItemEightClass(HashSet<int> ids);

        List<QueryGoodsInfoView> SearchGoodsInfo(String keyWords);

        void CloneMaterialSevenClass(HashSet<int> ids, bool includeChildren);

        void CloneMaterialEightClass(HashSet<int> ids);

        List<QueryGoodsInfoView> SearchMaterialInfo(String keyWords);


        #endregion


        #region Material

        List<MaterialFirstClass> GetSysMaterialFirstClass();

        void AddMaterialFirstClass(MaterialFirstClass item);

        void UpdateMaterialFirstClass(MaterialFirstClass Material);

        void DeleteMaterialFirstClass(int id);

        string GetMaterialFirstClassCode(int id);

        List<MaterialSecondClass> GetSysMaterialSecondClass();

        List<MaterialSecondClass> GetSysMaterialSecondClassByParentId(int parentId);

        List<MaterialSecondClass> GetSysMaterialSecondClassByParentIds(HashSet<int> parentId);

        void AddMaterialSecondClass(MaterialSecondClass Material);

        void UpdateMaterialSecondClass(MaterialSecondClass Material);

        void DeleteMaterialSecondClass(int id);

        List<MaterialThirdClass> GetSysMaterialThirdClassByParentId(int parentId);

        List<MaterialThirdClass> GetSysMaterialThirdClassByParentIds(HashSet<int> parentId);

        void AddMaterialThirdClass(MaterialThirdClass Material);

        void UpdateMaterialThirdClass(MaterialThirdClass Material);

        void DeleteMaterialThirdClass(int id);

        List<MaterialForthClass> GetSysMaterialFourClassByParentId(int parentId);

        List<MaterialForthClass> GetSysMaterialFourClassByParentIds(HashSet<int> parentId);

        void AddMaterialFourClass(MaterialForthClass Material);

        void UpdateMaterialFourClass(MaterialForthClass Material);

        void DeleteMaterialFurClass(int id);

        List<MaterialFifthClass> GetSysMaterialFiveClassByParentId(int parentId);

        List<MaterialFifthClass> GetSysMaterialFiveClassByParentIds(HashSet<int> parentId);

        void AddMaterialFiveClass(MaterialFifthClass Material);

        void UpdateMaterialFiveClass(MaterialFifthClass Material);

        void DeleteMaterialFiveClass(int id);

        List<MaterialSixClass> GetSysMaterialSixClassByParentId(int parentId);

        List<MaterialSixClass> GetSysMaterialSixClassByParentIds(HashSet<int> parentId);

        void AddMaterialSixClass(MaterialSixClass Material);

        void UpdateMaterialSixClass(MaterialSixClass Material);

        void DeleteMaterialSixClass(int id);

        List<MaterialSevenClass> GetSysMaterialSevenClassByParentId(int parentId);

        List<MaterialSevenClass> GetSysMaterialSevenClassByParentIds(HashSet<int> parentId);

        void AddMaterialSevenClass(MaterialSevenClass Material);

        void UpdateMaterialSevenClass(MaterialSevenClass Material);

        void DeleteMaterialSevenClass(int id);

        List<MaterialEightClass> GetSysMaterialEightClassByParentId(int parentId);

        List<MaterialEightClass> GetSysMaterialEightClassByParentIds(HashSet<int> parentId);

        String GetMaterialEightClassCode(int id);

        void AddMaterialEightClass(MaterialEightClass Material);

        void UpdateMaterialEightClass(MaterialEightClass Material);

        void DeleteMaterialEightClass(int id);

        List<MaterialNineClass> GetSysMaterialNineClassByParentId(int parentId);

        List<MaterialNineClass> GetSysMaterialNineClassByParentIds(HashSet<int> parentId);

        void AddMaterialNineClass(MaterialNineClass Material);

        void UpdateMaterialNineClass(MaterialNineClass Material);

        void DeleteMaterialNineClass(int id);

        #endregion

        #region GoodsMaterial

        void AddGoodsMaterialClass(GoodsMaterialClass entity);

        void UpdateGoodsMaterialClass(GoodsMaterialClass entity);

        void DeleteGoodsMaterialClass(int id);

        List<GoodsMaterialClass> GetGoodsMaterialViewByEightClassId(int bindType, int eightClassId);

        #endregion

        #region Department


        List<Common.Entity.CompanyDepartment> GetSysCompanyDepartments();

        int AddCompanyDepartment(CompanyDepartment item);

        void UpdateCompanyDepartment(CompanyDepartment item);

        void DeleteCompanyDepartment(int id);

        List<Common.Entity.Department.CompanyStaff> GetSysCompanyStaffsByParentId(int parentId);

        List<Common.Entity.Department.CompanyStaff> GetAllSysCompanyStaffs();

        List<Common.Entity.Department.CompanyStaff> GetAllSysCompanyStaffBySetAccountName(string setAccountName);

	    int AddCompanyStaff(Common.Entity.Department.CompanyStaff item);

	    void UpdateCompanyStaff(Common.Entity.Department.CompanyStaff item);

	    void DeleteCompanyStaff(int id);

        List<Common.Entity.Department.CompanyAsset> GetSysCompanyAssetsByParentId(int parentId);

        List<Common.Entity.Department.CompanyAsset> GetSysCompanyAssetsByParentIds(HashSet<int> ids);

	    void AddCompanyAsset(Common.Entity.Department.CompanyAsset item);

	    void UpdateCompanyAsset(Common.Entity.Department.CompanyAsset item);

	    void BatchUpdateCompanyAsset(List<Common.Entity.Department.CompanyAsset> items);

	    void DeleteCompanyAsset(int id);

        CompanyStaffView doLogin(string name, string password, string setAccount, DateTime time);

        bool modifyPassword(string name, string oldPassword, string newPassword);


        #endregion

        #region invoice

        string GetSysInvoiceNextCode(int id);

        List<InvoiceFirstClass> GetSysInvoiceFirstClass();

        void AddInvoiceFirstClass(InvoiceFirstClass item);

        void UpdateInvoiceFirstClass(InvoiceFirstClass item);

        void DeleteInvoiceFirstClass(int id);

        List<InvoiceSecondClass> GetSysInvoiceSecondClassByParentId(int parentId);

        void AddInvoiceSecondClass(InvoiceSecondClass item);

        void UpdateInvoiceSecondClass(InvoiceSecondClass item);

        void DeleteInvoiceSecondClass(int id);

        #endregion

        #region feetype

        string GetSysFeeTypeNextCode(int id);

        List<FeeTypeFirstClass> GetSysFeeTypeFirstClass();

        void AddFeeTypeFirstClass(FeeTypeFirstClass item);

        void UpdateFeeTypeFirstClass(FeeTypeFirstClass item);

        void DeleteFeeTypeFirstClass(int id);

        List<FeeTypeSecondClass> GetSysFeeTypeSecondClassByParentId(int parentId);

        void AddFeeTypeSecondClass(FeeTypeSecondClass item);

        void UpdateFeeTypeSecondClass(FeeTypeSecondClass item);

        void DeleteFeeTypeSecondClass(int id);

        #endregion

        #region otherincome

        string GetSysOtherIncomeNextCode(int id);

        List<OtherIncomeFirstClass> GetSysOtherIncomeFirstClass();

        void AddOtherIncomeFirstClass(OtherIncomeFirstClass item);

        void UpdateOtherIncomeFirstClass(OtherIncomeFirstClass item);

        void DeleteOtherIncomeFirstClass(int id);

        List<OtherIncomeSecondClass> GetSysOtherIncomeSecondClassByParentId(int parentId);

        void AddOtherIncomeSecondClass(OtherIncomeSecondClass item);

        void UpdateOtherIncomeSecondClass(OtherIncomeSecondClass item);

        void DeleteOtherIncomeSecondClass(int id);

        #endregion

        #region cashbank

        string GetSysCashBankNextCode(int id);

        List<CashBankFirstClass> GetSysCashBankFirstClass();

        void AddCashBankFirstClass(CashBankFirstClass item);

        void UpdateCashBankFirstClass(CashBankFirstClass item);

        void DeleteCashBankFirstClass(int id);

        List<CashBankSecondClass> GetSysCashBankSecondClassByParentId(int parentId);

        List<CashBankSecondClass> GetAllSysCashBankSecondClass();

        void AddCashBankSecondClass(CashBankSecondClass item);

        void UpdateCashBankSecondClass(CashBankSecondClass item);

        void DeleteCashBankSecondClass(int id);

        #endregion

        #region SetAccount

        bool AddSetAccount(SetAccountInfo item);

        bool DeleteSetAccount(SetAccountInfo item);

        List<SetAccountInfo> GetSysSetAccount();

        SetAccountInfo GetSetAccountInfoById(int id);

        #endregion
    }
}
